The High Gain Antenna Pointing and Obstruction Avoidance software performs computations for pointing a Mars Rover high-gain antenna for communication with Earth while (1) avoiding line-of-sight obstructions (the Martian terrain and other parts of the Rover) that would block communication and (2) taking account of limits in ranges of motion of antenna gimbals and of kinematic singularities in gimbal mechanisms. The software uses simplified geometric models of obstructions and of the trajectory of the Earth in the Martian sky(see figure). It treats all obstructions according to a generalized approach, computing and continually updating the time remaining before interception of each obstruction. In cases in which the gimbal-mechanism design allows two aiming solutions, the algorithm chooses the solution that provides the longest obstruction-free Earth-tracking time. If the communication session continues until an obstruction is encountered in the current pointing solution and the other solution is now unobstructed, then the algorithm automatically switches to the other position. This software also notifies communication- managing software to cease transmission during the switch to the unobstructed position, resuming it when the switch is complete.